//
//  helpPublic.m
//  jiaKaoZhuShou
//
//  Created by 金艺社 on 2018/5/16.
//  Copyright © 2018年 金艺社. All rights reserved.
//

#import "helpPublic.h"

@implementation helpPublic
+ (UIViewController *)getCurrentViewController:(id)object {
    UIResponder *next = [object nextResponder];
    do {
        if ([next isKindOfClass:[UIViewController class]]) {
            return (UIViewController *)next;
        }
        next = [next nextResponder];
    } while (next !=nil);
    return nil;
}
+ (void)setCancleTitle:(UIBarButtonItem *)item {
    UIBarButtonItem *back = [[UIBarButtonItem alloc] initWithTitle:@"返回" style:UIBarButtonItemStylePlain target:nil action:nil];
    item = back;
}
@end
